<template>
	<div>
		<zi :list="listdata" @sento="getfrom"></zi>
		{{text}}
	</div>
</template>

<script>
	import zi from "../components/zi.vue"
	export default{
		data:function(){
			return{
				listdata:[
					{
						id:Math.random().toFixed(5),
						name:"Tara"
					},
					{
						id:Math.random().toFixed(5),
						name:"f(x)"
					},
					{
						id:Math.random().toFixed(5),
						name:"SNSD"
					},
				],
				text:"",
			}
		},
		components:{
			zi,
		},
		methods:{
			getfrom:function(val){
				console.log(val);
				this.text=val;
			}
		}
	}
</script>

<style>
</style>
